Electronic device for providing translation service and method thereof for determining translation candidate text from a plurality of candidate texts

ABSTRACT

An electronic device and method for providing a translations service are disclosed. The electronic device for providing a translation service includes an input unit comprising input circuitry configured to receive input text of a first language, a processor configured to divide the input text into a main segment and a sub-segment and to generate output text of a second language by selecting translation candidate text corresponding to the input text from translation candidate text of the second language, based on a meaning of text included in the sub-segment, and an output unit comprising output circuitry configured to output the output text.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based on and claims priority under 35 U.S.C. § 119to Korean Patent Application No. 10-2016-0075083, filed on Jun. 16,2016, in the Korean Intellectual Property Office, the disclosure ofwhich is incorporated by reference herein in its entirety.

BACKGROUND 1. Field

The present disclosure relates generally to an electronic device andmethod for providing a translation service, and for example, to anelectronic device and method for providing a translation result matchingup with a user's intention for a word having multiple meanings.

2. Description of Related Art

As various devices, such as mobile terminals, provide more complex anddiverse functions, there is a growing need for automatic translationtechnology for text or a speech input by using the devices.

Since there are words or sentences having multiple meanings in almostall languages, translation errors may occur due to an insufficientunderstanding of surrounding context referred to by users during actualconversations.

There is a need to increase translation accuracy and preventing and/orreducing occurrence of translation errors stemming from words orsentences having multiple meanings.

SUMMARY

An electronic device and method for providing a translation resultmatching up with a user's intention for a word having multiple meaningsare provided.

Additional aspects will be set forth in part in the description whichfollows and, in part, will be apparent from the description.

According to an aspect of an example embodiment of the presentdisclosure, an electronic device for providing a translation serviceincludes an input unit comprising input circuitry configured to receiveinput text of a first language, a processor configured to divide theinput text into a main segment and a sub-segment and to generate outputtext of a second language by selecting translation candidate textcorresponding to the input text from translation candidate text of thesecond language, based on a meaning of text included in the sub-segment,and an output unit comprising output circuitry configured to output theoutput text.

The output text of the second language may be a translation of the mainsegment of the input text.

The processor may extract translation candidate words of the secondlanguage for words included in the input text, and determine firstweights for the translation candidate words of the second language, thefirst weights indicating a degree of similarity between the translationcandidate words of the second language and words included in the mainsegment with respect to the meaning of the text included in thesub-segment.

The processor may set a word included in the main segment andcorresponding to a translation candidate word having a highest firstweight as a target word which requires further defining based on thesub-segment.

The processor may extract translation candidate words of the secondlanguage for words included in the input text, and determine, based onthe meaning of the main segment in combination with the sub-segment,second weights for the translation candidate words of the secondlanguage, the second weights indicating a degree of irrelevancy betweenthe translation candidate words of the second language and wordsincluded in the main segment, when a plurality of translation candidatewords of the second language is searched for the words included in themain segment.

The processor may set one of the words included in the main segment andhaving a highest second weight as a target word sub-segment whichrequires further defining based on the sub-segment.

The processor may extract translation candidate words of the secondlanguage for words included in the input text, and determine thirdweights for the translation candidate words of the second language, thethird weights indicating probabilities of a sequential order betweenadjacent translation candidate words included among the translationcandidate words, when a plurality of translation candidate words of thesecond language is searched for the words included the main segment.

The processor may select a translation candidate word having a highestthird weight from the plurality of translation candidate words of thesecond language and generate the output text using the selectedtranslation candidate word.

The input unit may include circuitry configured to receive the inputtext via at least one of speech signals and characters input via akeyboard.

The processor may be configured to convert the input speech signals intothe characters when the speech signals are received.

When the input text includes a keyword, the processor may set a firsttext segment received before the keyword as the main segment and asecond text segment received after the keyword as the sub-segment.

The processor may set, as the sub-segment, a portion of the input textwhich is input simultaneously with a user input or a portion of theinput text which is input after the user input.

The processor may convert the output text to an audio signal.

The output unit may include circuitry configured to output at least oneof the output text and the audio signal.

According to an aspect of another example embodiment, a method ofproviding a translation service by an electronic device includesreceiving input text of a first language, dividing the input text into amain segment and a sub-segment, generating output text of a secondlanguage by selecting translation candidate text corresponding to theinput text from translation candidate text of the second language, basedon a meaning of text included in the sub-segment, and outputting theoutput text.

The output text of the second language may be a translation of the mainsegment of the input text in the generating of the output text.

The generating of the output text may include extracting translationcandidate words of the second language for words included in the inputtext, and determining first weights for the translation candidate wordsof the second language, the first weights indicating a degree ofsimilarity between the translation candidate words of the secondlanguage and words included in the main segment with respect to themeaning of the text included in the sub-segment.

The generating of the output text may include setting a word included inthe main segment and corresponding to a translation candidate wordhaving a highest first weight as a target word which requires furtherdefining based on the sub-segment.

The generating of the output text may include extracting translationcandidate words of the second language for words included in the inputtext, and determining, based on the meaning of the main segment incombination with the sub-segment, second weights for the translationcandidate words of the second language, the second weights indicating adegree of irrelevancy between the translation candidate words of thesecond language and words included in the main segment.

The generating of the output text may include setting one of the wordsincluded in the main segment and having a highest second weight as atarget word which requires further defining based on the sub-segment.

The generating of the output text may include extracting translationcandidate words of the second language for words included in the inputtext and determining third weights for the translation candidate wordsof the second language, the third weights indicating probabilities of asequential order between adjacent translation candidate words includedamong the translation candidate words when a plurality of translationcandidate words of the second language is searched for the wordsincluded the main segment.

The generating of the output text may include selecting a translationcandidate word having a highest third weight from the plurality oftranslation candidate words of the second language and generating theoutput text using the selected translation candidate word.

The receiving of the input text may be performed by receiving the inputtext via at least one of speech signals and characters input via akeyboard.

The generating of the output text may include converting the speechsignals into characters when the speech signals are received.

The dividing of the input text into a main segment and a sub-segment maybe performed by setting a text segment received before a predeterminedkeyword as the main segment and a text segment received after thekeyword as the sub-segment when the input text includes the keyword.

The dividing of the input text into a main segment and a sub-segment maybe performed by setting, as the sub-segment, a portion of the input textwhich is input simultaneously with a user input or a portion of theinput text which is input after the user input.

The generating of the output text may include converting the output textto an audio signal.

The outputting of the output text may be performed by outputting atleast one of the output text and the audio signal.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other aspects, features and attendant advantages of thepresent disclosure will become apparent and more readily appreciatedfrom the following detailed description, taken in conjunction with theaccompanying drawings, in which like reference numerals refer to likeelements, and wherein:

FIG. 1 is a diagram illustrating an example embodiment;

FIGS. 2 and 3 are flowcharts illustrating an example method of providinga translation service implemented by an electronic device according toan example embodiment;

FIG. 4 is a diagram illustrating an example of how an electronic devicereceives input text according to an example embodiment;

FIG. 5 is a flowchart illustrating an example method of determining afirst weight considered while an electronic device generates output textaccording to an example embodiment;

FIG. 6 is a diagram illustrating an example first weight according to anexample embodiment;

FIGS. 7 and 8 are diagrams illustrating an example method of determininga first weight according to an example embodiment;

FIG. 9 is a flowchart illustrating an example method of determining asecond weight considered when an electronic device according to anembodiment generates output text;

FIG. 10 is a diagram illustrating an example method of determining asecond weight according to an example embodiment;

FIG. 11 is a flowchart illustrating an example method of determining athird weight considered when an electronic device according to anexample embodiment generates output text;

FIG. 12 is a diagram illustrating an example method of determining athird weight according to an example embodiment; and

FIGS. 13 and 14 are block diagrams illustrating an example electronicdevice according to an example embodiment.

DETAILED DESCRIPTION

Reference will now be made to various embodiments, examples of which areillustrated in the accompanying drawings, wherein like referencenumerals refer to like elements throughout. In this regard, the presentembodiments may have different forms and should not be understood asbeing limited to the descriptions set forth herein. Accordingly, theembodiments are merely described below, by referring to the figures, toexplain aspects. As used herein, the term “and/or” includes any and allcombinations of one or more of the associated listed items. Expressionssuch as “at least one of,” when preceding a list of elements, modify theentire list of elements and do not modify the individual elements of thelist.

The terms used in this disclosure are general terms currently widelyused in the art in consideration of functions in regard to the presentdisclosure, but the terms may vary according to the intention of thoseof ordinary skill in the art, precedents, or new technology in the art.Thus, the terms used in the disclosure should be understood not assimple names but based on the meaning of the terms and the overalldescription of the disclosure.

It will be understood that although the terms “first”, “second”, etc.may be used herein to describe various components, these componentsshould not be limited by these terms. These terms are only used todistinguish one component from another.

The terms used in the present disclosure are merely used to describeparticular example embodiments, and are not intended to limit thepresent disclosure. An expression used in the singular encompasses theexpression of the plural, unless it has a clearly different meaning inthe context. When an element is referred to as being “connected to”another element, it may be directly connected to the other element orelectrically connected to the other element with an intervening elementdisposed therebetween. Also, it is to be understood that the terms“include” and “have” are intended to indicate the existence of elementsdisclosed, and are not intended to preclude the possibility that one ormore other elements may exist or may be added.

Throughout the disclosure, particularly, the claims, the term “the” andsimilar terms may refer to both singular and plural forms. Also, thereference numerals used in operations are not intended to describe theorder of operations and the operations may be performed in a differentorder unless otherwise stated. The present disclosure is not limited bythe order of operations.

The terms “according to some embodiments” or “according to anembodiment” used throughout the disclosure do not necessarily indicatethe same embodiment.

Some embodiments of the present disclosure may be represented byfunctional block configurations and various processing operations. Someor all of these functional blocks may be implemented using variousnumbers of hardware and/or software components that perform particularfunctions. For example, the functional blocks of the present disclosuremay be implemented using one or more microprocessors or circuits for agiven function. Also, for example, the functional blocks of the presentdisclosure may be implemented in various programming or scriptinglanguages. The functional blocks may be implemented with algorithmsrunning on one or more processors. The present disclosure may alsoemploy conventional techniques for electronic configuration, signalprocessing, and/or data processing. The terms “mechanism”, “element”,“unit” and “configuration” may be used in a broad sense and are notlimited to mechanical and physical configurations.

Also, connection lines or connection members between the componentsillustrated in the drawings are merely illustrative of functionalconnections and/or physical or circuit connections. In actual devices,connections between the components may be represented by variousfunctional connections, physical connections, or circuit connectionsthat may be replaced or added.

Hereinafter, the present disclosure will be described in greater detailwith reference to the accompanying drawings.

FIG. 1 is a diagram illustrating an example embodiment of the presentdisclosure.

According to an embodiment, and referring to FIG. 13, an electronicdevice 1000 may provide an automatic translation function.

The electronic device 1000 according to an embodiment may receive aspeech signal or text from a user via an input unit 1800. The input unit1800 may include various input circuitry for receiving the input text.Upon receiving the speech signal, the electronic device 1000 may performautomatic speech recognition (ASR) to convert the received speech signalinto text.

Automatic speech recognition refers to a process of automaticallyrecognizing a speech signal from a speaker and translating therecognized speed into text. Automatic speech recognition may also bereferred to as speech to text (STT), without being limited thereto.

The electronic device 1000 may translate text of a first language intotext of a second language by performing machine translation (MT).

Upon completion of machine translation, the electronic device 1000 mayconvert text of the second language into a speech signal of the secondlanguage by performing text to speech (TTS).

The electronic device 1000 may output the speech signal of the secondlanguage via a sound output unit 1220 (see, e.g., FIG. 14).Alternatively, the electronic device 1000 may output the translated textof the second language via a display unit 1210 (see, e.g., FIG. 14).

As described above, the electronic device 1000 may provide an automatictranslation service.

In this regard, the electronic device 1000 realizes a method of reducingtranslation errors that may occur during machine translation dependingon characteristics of a language including words or sentences havingmultiple meanings and deriving a translation result matching up with auser's translation intention.

Particularly, referring to FIG. 1, the electronic device 1000 accordingto an embodiment may drive output text 102, which is a translationresult of the second language matching up with a user's intentioncorresponding to a main segment 101 a, based on a meaning of asub-segment 101 b of the input text 101.

Throughout the disclosure, sentences of the first language input by theuser to be translated may be referred to as input text 101, and atranslation result of the second language translated by the electronicdevice 1000 may be referred to as output text 102.

A sentence may refer to a complete textural unit delimited by periods,question marks, exclamation marks, and the like. Also, a sentence maynot be complete but include one or more words or a combination of words.

As illustrated in FIG. 1, the electronic device 1000 may receive inputtext 101 of the first language. The input text 101 according to anembodiment may include a main segment 101 a and a sub-segment 101 b.

The main segment 101 a according to an embodiment may be a sentence tobe translated. The sub-segment 101 b may be a phrase added to the mainsegment to further explain the meaning of the main segment 101 a to betranslated.

For example, referring to FIG. 1, if the input text 101 is “

”, the output text 102 may be “Please make sure there's no work, whichhas been die out with the project.”

The input text 101 may be divided into a main segment 101 a of “

” and a sub-segment 101 b of “

”.

Referring to FIG. 1, the “

” pronounced as “sajang” in Korean and included in the input text 101 ofthe first language (Korean) may be a polysemic word. For example, the ‘

’ in Korean has multiple meanings such as ‘president of a company’,‘sandy beach’, ‘no longer be used or practiced’, and ‘master andsenior’.

In the context of the above conversation, the “

” of the input text 101 means “no longer be used or practiced’. If atranslation system selects a word simply based on a statistical methodwithout having clear understanding of surrounding context, a translationresult may not match up with the user's intention, and thus there is apotential risk of translation error.

The electronic device 1000 according to an embodiment may accuratelygenerate “die out” as an accurate translation result for the word “

” included in the main segment 101 a and having multiple meanings basedon the meaning of the sub-segment 101 b (“

”) additionally explaining the main segment 101 a to prevent translationerrors.

This will also be described with reference to another example, “

” pronounced as “dojang” in Korean is used in the meaning of “rubber orwood seal affixed to documents” with a highest probability of 63% amongvarious meanings thereof. The “

” is used in the meaning of “martial arts studio” with a second highestprobability and may also be used in the meanings of “painting” and“master craftsman in sword”. Thus, in the case where the speaker doesnot intend to use “

” in the meaning of “rubber or wood seal affixed to documents”, aprobability of translation error may be estimated at 37% via translationby using a statistical method.

According to an embodiment, translation error may be reduced byproviding simple additional explanation to a word having multiplemeanings to translate the work without using only the statisticalmethod.

In addition, for example, when a user says “

”, the word “

” pronounced as “kongwhang” in Korean refers to “panic” in English.However, the word “

” may also be used in economics and psychology. In this regard, thespeaker may provide an intended meaning of the “

” by adding “

(mental disorder)” to the text as additional explanation.

In everyday conversations, the speaker may provide additionalexplanation about a sentence or word having multiple meanings that maybe misunderstood by a counterpart. Thus, the user may obtain an accuratetranslation result matching up with the user's intention via aconvenient and natural method of inputting additional explanation thatis similar to a supplementary remark used in everyday conversations.

Also, the electronic device 1000 may not translate all of the sentencesinput by the user. As illustrated in FIG. 1, the electronic device 1000may output the translation result of “Please make sure there's no work,which has been die out with the project.” of the second language(English) corresponding only to the main segment 101 a of “

.” (Korean) included in the input text 101 except for the sub-segment101 b.

The user may add a word or sentence additionally explaining a word orsentence having multiple meanings during everyday conversations toprevent misunderstanding of the counterpart. However, in the case wherea word or sentence, as a translation result of the second language(English), has a single meaning without causing ambiguous interpretationalthough the word or sentence of the first language (Korean) to betranslated has multiple meanings, there is no need to translate theadditional explanation input by the user for clear understanding of theword or sentence to be translated.

For example, when the speaker says “

”, and the word “

” having multiple meanings is accurately translated into “mental panic”instead of “economic crisis”, there is no need to repeatedly translatethe additional explanation “

” into “mental disorder” and deliver the translated result to thecounterpart.

Also, for example, when a speaker says “

”, the “

” in Korean has multiple meanings and may be misunderstood. Thus, theadditional phrase “

” may be required. If the user intends to use “

” in the meaning of “martial arts studio”, which is being used with arelatively lower probability than “object affixed to documents”, insteadof “object affixed to documents”, misunderstanding of a hearer may beprevented by providing an supplementary remark therefor. However,“martial arts studio” is used as a place where people learn martial artsand there is a low risk of misunderstanding in English, a translatedlanguage. In this case, if “

” included in the input text is translated, the translated result may beregarded as redundancy and restatement of the user's intention inEnglish.

The electronic device 1000 according to an embodiment does not outputtranslated results of all input texts, but outputs a translated resultof only a sentence intended by the user by excluding a supplementaryremark for additional explanation input by the user. Thus, naturaltranslation results may be obtained in the real translation environment.

FIGS. 2 and 3 are flowcharts illustrating an example method of providinga translation service implemented by an electronic device according toan example embodiment.

Referring to FIG. 2, in operation S201, the electronic device 1000according to an embodiment may receive input text of the first language.

The electronic device 1000 may receive the input text.

The electronic device 1000 may also receive the input text as a speechsignal. If the input text is a speech signal, the electronic device 1000may convert the received speech signal into text.

As another example, the electronic device 1000 may acquire input text byextracting text from an image file by performing optical characterrecognition (OCR). However, the present disclosure is not limitedthereto.

In operation S202 of FIG. 2, the electronic device 1000 may divide theinput text into a main segment and a sub-segment.

As described above with reference to FIG. 1, the input text 101 mayinclude the main segment 101 a and the sub-segment 101 b.

The electronic device 1000 may determine a portion of the input textinput simultaneously with a user input (for example, input via apredetermined physical button and touch input to the display unit 1210)or a portion input after the user input as the sub-segment. This will bedescribed later in greater detail with reference to FIG. 4.

Also, if the input text includes a predetermined keyword, the electronicdevice 1000 may determine one portion of the input text before thekeyword as a main segment and another portion after the keyword as asub-segment. For example, if the user says “

”, the electronic device 1000 may divide the text into the main segmentand the sub-segment based on the predetermined keyword (e.g., “

”).

In addition, the electronic device 1000 according to an embodiment maydivide the text into the main segment and the sub-segment by calculatingat least one value of a first weight (degree of similarity), a secondweight (degree of dramatic change), and a third weight (likelihood) as avalue used to analyze text and translate the text into another language.The first, second, and third weights will be described later in moredetail with reference to FIGS. 5 to 12.

In addition, upon determination that a word is repeated in the inputtext, for example, “

” said by the user, the electronic device 1000 may determine a portionof the input text after the second “

” as the sub-segment. Also, the electronic device 1000 may set the word“

” of the main segment as a word which requires further defining based onthe sub-segment.

As another example, upon receiving the input text as a speech signal,the electronic device 1000 may divide the input text into the mainsegment and the second based on differences of energy, pitch, waveform,spectrum, and the like of the speech signal. This is because the usergenerally speaks the main segment to be translated louder and thesub-segment, as additional explanation, quieter.

As another example, if the input text includes a string of words that isnot a complete sentence with a high probability, the electronic device1000 may determine that the string of words is the sub-segment. Also,when the input text includes a predetermined suffix, the electronicdevice 1000 may determine that a portion including the suffix is thesub-segment with a high probability. For example, if the input text is “

”, the supplementary remark (“

”) may be the sub-segment since the supplementary remark is not acomplete sentence and includes a word indicating location, object, orperson such as “

, ˜

, and

” (bound noun in case of Korean).

As another example, the electronic device 1000 may set a word locatedcloser to the supplementary remark as a target word which requiresfurther explanation using the supplementary remark with a highprobability among the words included in the input text.

If the speaker says the supplementary remark, it is highly probable thatthe supplementary remark is spoken immediately after saying the targetword having multiple meanings. As a word is farther from the targetword, the probability of providing additional explanation decreases.

As a distance between a word included in the main segment and thesub-segment increases, the probability that the word is a target wordmay decrease. This indicates that the probability that a word includedin the main segment is a target word is inversely proportional to thedistance between the word of the main segment and that of thesub-segment.

This may be expressed by the following equation.

Probability of being target word=alpha/dist(sub-segment, Word[i])

In this case, alpha is a constant experimentally estimated. Thedist(word1, word2) refers to a distance between a first word word1 and asecond word word2.

As another example, the electronic device 1000 may output a messageasking the user to input additional explanation. If the input textincludes a word having multiple meanings and translation accuracy islower than a predetermined threshold value, the electronic device 1000may determine that additional explanation therefor is required and askthe user to provide additional explanation for the word.

Also, the speaker may recognize that a predetermined word spoken by thespeaker has multiple meanings or may cause misunderstanding of thehearer after utterance. In this case, the electronic device 1000 mayrecord the utterance of the speaker, convert the speech signal intotext, and display the text on the display unit 1210. Then, the user maysay a sub-segment to further explain after selecting a target word ofthe text displayed on the display unit 1210.

In operation S203 of FIG. 2, the electronic device 1000 may generateoutput text of the second language by selecting one out of the pluralityof translation candidate sentences of the second language correspondingto the input text based on the meaning of the sub-segment.

The electronic device 1000 may generate output text of the secondlanguage from the input text of the first language based on thesub-segment additionally explaining the main segment. In this case, theelectronic device 1000 may generate output text corresponding only tothe main segment of the input text except for the sub-segment.

According to an embodiment, the electronic device 1000 may generateoutput text by selecting one out of a plurality of translation candidatesentences based on at least one of the first, second, and third weights.The first, second, and third weights will be described later in moredetail with reference to FIGS. 5 to 12.

In operation S204 of FIG. 2, the electronic device 1000 may output theoutput text.

The electronic device 1000 according to an embodiment may convert theoutput text generated as text into an audio signal by performing text tospeech (TTS). The sound output unit 1220 may output the output textconverted into the audio signal.

Also, the display unit 1210 may display the output text generated astext.

FIG. 3 is a flowchart illustrating an example method of providing atranslation service implemented by the electronic device according to anexample embodiment in greater detail.

In operation S301 of FIG. 3, the electronic device 1000 according to anembodiment may receive the input text of the first language. Inoperation S302, if the input text is a speech signal, the electronicdevice 1000 may convert the speech signal into text. This is describedabove with reference to operation S201 of FIG. 2, and thus descriptionsthereof will not be repeated.

In operation S303 of FIG. 3, the electronic device 1000 may divide theinput text (including a speech signal converted into text) into a mainsegment and a sub-segment. This is described above with reference tooperation S202 of FIG. 2, and thus descriptions thereof will not berepeated.

In operation S304 of FIG. 3, the electronic device 1000 may select oneout of a plurality of translation candidate sentences of the secondlanguage corresponding to the input text based on the meaning of thesub-segment. In operation S305, the electronic device 1000 may generateoutput text of the second language corresponding only to the mainsegment of the input text and not for the sub-segment. This is describedabove with reference to operation S203 of FIG. 2, and thus descriptionsthereof will not be repeated.

In operation S306 of FIG. 3, the electronic device 1000 may convert theoutput text generated as text into an audio signal. In operation S307,the electronic device 1000 may output the output text as the audiosignal. This is described above with reference to operation S204 of FIG.2, and thus descriptions thereof will not be repeated.

FIGS. 1 to 3 illustrate an example embodiment, and the presentdisclosure is not limited thereto.

FIG. 4 is a diagram illustrating an example of how an electronic devicereceives input text according to an embodiment.

According to an embodiment, upon receiving a predetermined user input,the electronic device 1000 may distinguish the main segment from thesub-segment based on the user input.

For example, the electronic device 1000 may receive an input of “

” 401 as illustrated in FIG. 4. The electronic device 1000 may receive aspeech signal of the user via a microphone 1620 (see, e.g., FIG. 14).The electronic device 1000 may also receive text via a keyboarddisplayed on the display unit 1210 (see, e.g., FIG. 14), without beinglimited thereto.

Upon receiving a touch input of the user to select an icon (e.g.,‘additional explanation’ 402) displayed on the display unit 1210, theelectronic device 1000 may determine input text of the input speechsignal (e.g., “

” 404) as the sub-segment.

Also, the electronic device 1000 may determine a following input text(e.g., “

” 404) as the sub-segment after receiving the touch input of the user toselect the icon (e.g., ‘additional explanation’ 402) displayed on thedisplay unit 1210.

FIG. 4 illustrates an example embodiment, and the present disclosure isnot limited thereto.

FIG. 5 is a flowchart illustrating an example method of determining afirst weight considered when an electronic device generates output textaccording to an example embodiment. FIG. 6 is a diagram illustrating anexample of the first weight according to an example embodiment. FIGS. 7.And 8 are diagrams illustrating an example method of determining thefirst weight according to an example embodiment. FIGS. 6 to 8 will bedescribed while describing the flowchart of FIG. 5.

In operation S501 of FIG. 5, the electronic device 1000 may extracttranslation candidate words of the second language for each of the wordsincluded in the input text.

Referring to FIG. 8, the electronic device 1000 may extract translationcandidate words of the second language (English) for each of the words(for example,

, and the like) included in the main segment 101 a. For example,candidate words such as ‘Tooth/Louse/This/Two’ may be extracted for theword

, candidate words such as ‘President/Die out/Sand beach’ may beextracted for the word

, candidate words such as ‘Work/Day/One’ may be extracted for the word

, and candidate words such as ‘Remove/Die out’ may be extracted for theword

.

Also, the electronic device 1000 may extract ‘remove’ as a candidateword of the second language for the sub-segment 101 b ‘

(work to lose)’. The electronic device 1000 according to an embodimentmay also extract candidate words for another word or morpheme includedin the input text.

In operation S502 of FIG. 5, the electronic device 1000 may determinethe first weight indicating the degree of similarity between the meaningof the sub-segment and each of the translation candidate words of thesecond language corresponding to one of the words included in the mainsegment.

The first weight (degree of similarity) may refer to a value indicatinga distance between a first word and a second word related to the firstword in a space. Referring to FIG. 6, words of a language may be locatedat predetermined positions in a virtual space.

For example, when a distance between “rabbit” and “lion” is closer thanthat between the “rabbit” and “car”, the words “rabbit” and “lion” mayhave a higher first weight (degree of similarity).

Referring to FIG. 7, since “remove” among the candidate words for “

” and “die out” among the candidate words for “

” are located close to “

: work to lose”, they may have higher first weights (degrees ofsimilarity) than the other candidate words.

Referring to FIG. 8, the electronic device 1000 may determine that

die out’ and

: remove and die out’ included in the main segment have higher firstweights than the other words included in the main segment based on themeaning of the sub-segment 101 b (

: remove).

In operation S503 of FIG. 5, the electronic device 1000 may determine aword corresponding to a translation candidate word having a highestfirst weight as a target word which requires further defining based onthe sub-segment among the words included in the main segment.

Referring to FIG. 8, the electronic device 1000 may set the words

and

having higher first weights and included in the main segment as targetwords which require further defining based on the sub-segment. Also, theelectronic device 1000 may determine the word

as a target word by considering at least one of the second and thirdweights, which will be described later, in addition to the first weight.

According to an embodiment, after determining the target word, theelectronic device 1000 may generate output text by determining thedegree of similarity between the translation candidate word for thetarget word and the meaning of the sub-segment.

FIG. 9 is a flowchart illustrating an example method of determining asecond weight considered when the electronic device generates outputtext according to an example embodiment. FIG. 10 is a diagramillustrating an example method of determining a second weight accordingto an example embodiment. FIG. 10 will be described while describing theflowchart of FIG. 9.

In operation S901 of FIG. 9, the electronic device 1000 may extracttranslation candidate words of the second language for each of the wordsincluded in the input text.

For example, as described above with reference to FIG. 8, candidatewords such as ‘President/Die out/Sand beach’ may be extracted for theword

and candidate words such as ‘Remove/Die out’ may be extracted for theword

. The electronic device 1000 may also extract candidate words foranother word or morpheme included in the input text.

In operation S902 of FIG. 9, if a plurality of translation candidatewords of the second language is searched for one word included in themain segment, the electronic device 1000 may determine the second weightindicating the degree of irrelevancy of the translation candidate words.

Referring to FIG. 10, the words “

” and “

” have a plurality of translation candidate words, respectively, and itmay be confirmed that an area of a space defined by the translationcandidate words for “

” is greater than an area of a space defined by the translationcandidate words for “

”. Thus, the second weight (degree of dramatic change) of “

” may be greater than that of “

”.

A large difference in the space created by the translation candidatewords may indicate that the sub-segment may increase translationaccuracy and the risk of translation errors occurring may increase byselecting an incorrect translation candidate word.

According to an embodiment, the second weight (degree of dramaticchange) refers to a relevance between one translation candidate word andanother translation candidate word among a plurality of translationcandidate words corresponding to one word. The second weight may alsorefer to the degree of dramatic change of a meaning when the translationcandidate word is incorrectly selected out of the plurality oftranslation candidate words.

Thus, it may be determined that there is a higher necessity to convey aclear meaning to the counterpart through additional explanation as thesecond weight (degree of dramatic change) increases.

In operation S903 of FIG. 9, the electronic device 1000 may set a wordincluded in the main segment and having the highest second weight as atarget word which requires further defining based on the sub-segment.

Referring to FIG. 10, the electronic device 1000 according to anembodiment may increase translation accuracy by selecting the word “

” as the target word which requires further defining based on thesub-segment instead of the word “

”.

According to an embodiment, after determining the target word, theelectronic device 1000 may generate output text, as a translationresult, by determining the degree of similarity between the meaning ofthe sub-segment and the translation candidate words of the target word.

FIGS. 5 to 9 illustrate various example embodiments, and the presentdisclosure is not limited thereto.

FIG. 11 is a flowchart illustrating an example method of determining athird weight considered when an electronic device generates output textaccording to an example embodiment. FIG. 12 is a diagram illustrating anexample method of determining the third weight according to an exampleembodiment. FIG. 12 will be described while describing the flowchart ofFIG. 11.

In operation S1101 of FIG. 11, the electronic device 1000 may extracttranslation candidate words of the second language for each of the wordsincluded in the input text.

For example, as described above with reference to FIG. 8, candidatewords such as ‘President/Die out/Sand beach’ may be extracted for theword

. The electronic device 1000 may also extract candidate words foranother word or morpheme included in the input text.

In operation of S1102 of FIG. 11, if a plurality of translationcandidate words of the second language are searched for one of the wordsincluded in the main segment, the electronic device 1000 may determinethe third weight indicating a probability that each of the translationcandidate words and another translation candidate words adjacent theretobefore and after the translation candidate word are sequentially listedto form one sentence.

The third weight (likelihood) according to an embodiment may be a valueindicating likelihood of constituting one sentence or phrase using astring of sequential words. For example, a string of words “rabbit eatsgrass” has likelihood of happening far higher than a string of words“rabbit eats sand”.

Referring to FIG. 12, a probability that each of translation candidatewords “president”, “sand beach”, and “die out” for the word “

” is sequentially listed with respect to another translation candidatewords “has”, “been”, and “with” located before and after the word toconstitute one sentence may be calculated (determined).

P(X3|X1, X2) may refer to a probability that X1 and X2 are sequentiallylisted and then X3 is listed.

Referring to FIG. 12, the word “die out” among the translation candidatewords for “

” may have a higher third weight (likelihood) that is a probability thatthe “die out” is sequentially listed with respect to another translationcandidate words “has”, “been”, and “with”.

In operation S1103 of FIG. 11, the electronic device 1000 may generatethe output text by selecting the translation candidate word having thehighest third weight among the plurality of translation candidate words.

Referring to FIG. 12, the electronic device 1000 may generate the outputtext “Please make sure there's no work, which has been die out with theproject.” by selecting “die out” having the highest third weight.

FIGS. 11 and 12 illustrate example embodiments, and the presentdisclosure is not limited thereto.

FIGS. 13 and 14 are block diagrams illustrating an example electronicdevice according to an example embodiment.

Referring to FIG. 13, the electronic device 1000 according to an exampleembodiment may include a processor (e.g., including processingcircuitry) 1300, an input unit (e.g., including input circuitry) 1800,and an output unit (e.g., including output circuitry) 1200.

However, the elements illustrated in FIG. 13 are not essential elementsof the electronic device 1000. The electronic device 1000 may beimplemented using more or less elements than those illustrated in FIG.13.

For example, with reference to FIG. 14, the electronic device 1000according to an embodiment may further include a user input unit (e.g.,including input circuitry) 1100, a sensing unit (e.g., including atleast one sensor) 1400, a communication unit (e.g., includingcommunication circuitry) 1500, an audio/video (A/V) input unit (e.g.,including A/V input circuitry) 1600, and a memory 1700 in addition tothe processor 1300, the input unit 1800, and the output unit 1200illustrated in FIG. 13.

The input unit 1800 of FIG. 13 may include the user input unit 1100 andthe A/V input unit 1600 including a camera 1610 and the microphone 1620.

The user input unit 1100 may refer, for example, to a device used toinput data to control the electronic device 1000 by the user. Forexample, the user input unit 1100 may include various input circuitry,such as, for example, and without limitation, a key pad, a dome switch,a touch pad (capacitive overlay, resistive overlay, infrared beam,surface acoustic wave, integral strain guage, piezo electric, and thelike), a jog wheel, a jog switch, and the like, without being limitedthereto.

According to an embodiment, the user input unit 1100 may receive theinput text to be translated.

The output unit 1200 may output an audio signal, a video signal, avibration signal. The output unit 1200 may include various outputcircuitry, including, for example, the display unit 1210, the soundoutput unit 1220, and a vibration motor 1230.

The display unit 1210 may include various display circuitry and displayelements that display information processed by the electronic device1000.

For example, the display unit 1210 may include a user interface UI toexecute an application providing a translation service, a user interfaceto receive input text to be translated, a use interface to receive amain segment and a sub-segment separately from each other, and a userinterface to output output text as a translation result.

Also, the display unit 1210 may display the output text of the secondlanguage as a translation result of the input text of the firstlanguage.

Meanwhile, if the display unit 1210 is implemented using a touch screenhaving a layered structure including a touch pad, the display unit 1210may also be used as an input device in addition to an output device. Thedisplay unit 1210 may include at least one of a liquid crystal display,a thin film transistor-liquid crystal display, an organic light-emittingdiode, a flexible display, a three-dimensional (3D) display, and anelectrophoretic display. Also, the electronic device 1000 may includetwo or more display units 1210 in accordance with the configuration ofthe electronic device 1000. In this case, the two or more display units1210 may be arranged to face each other by using hinges.

The sound output unit 1220 may include various circuitry that outputsaudio data received from the communication unit 1500 or stored in thememory 1700. The sound output unit 1220 may also output sound signalsrelated to functions performed in the electronic device 1000 (e.g., callsignal reception sound, message reception sound, and notificationsound). The sound output unit 1220 may include various sound outputcircuitry, such as, for example, and without limitation, a speaker, abuzzer, and the like.

According to an embodiment, the sound output unit 1220 may output theoutput text, which is a translation result of the input text of thefirst language to be translated, as sounds.

The vibration motor 1230 may output a vibration signal. For example, thevibration motor 1230 may output a vibration signal corresponding tooutput of audio data or video data (e.g., call signal reception soundand message reception sound). The vibration motor 1230 may also output avibration signal in case of receiving a touch input via the touchscreen,

In general, the processor 1300 may include various processing circuitryand controls the overall operation of the electronic device 1000. Forexample, the processor 1300 may control the overall operation of theuser input unit 1100, the output unit 1200, the sensing unit 1400, thecommunication unit 1500, and the A/V input unit 1600 by executingprograms stored in the memory 1700.

Particularly, the processor 1300 may divide the input text into the mainsegment and the sub-segment.

The processor 1300 may also generate the output text of the secondlanguage by selecting one out of a plurality of translation candidatesentences of the second language corresponding to the input text, basedon the meaning of the sub-segment.

The processor 1300 may also generate the output text corresponding onlyto the main segment of the input text except for the sub-segment.

The processor 1300 may also extract translation candidate words of thesecond language corresponding to each of the words included in the inputtext.

The processor 1300 may also determine the first weight indicating thedegree of similarity between the meaning of the sub-segment and everytranslation candidate word of the second language corresponding to eachof the words constituting the main segment.

The processor 1300 may also determine a word corresponding to thetranslation candidate word having the highest first weight and includedin the main segment as a target word which requires further definingbased on the sub-segment.

The processor 1300 may also extract translation candidate words of thesecond language corresponding to each of the words included in the inputtext, and when a plurality of translation candidate words of the secondlanguage is searched for a word included in the main segment, determinethe second weight indicating the degree of irrelevancy of the pluralityof translation candidate words.

The processor 1300 may also set a word included in the main segment andhaving the highest second weight as a target word which requires furtherdefining based on the sub-segment.

Also, the processor may extract translation candidate words of thesecond language for the words included in the input text, and when aplurality of translation candidate words of the second language issearched for the words included in the main segment, determine the thirdweight indicating a probability that each of the plurality oftranslation candidate words and another translation candidate wordslocated adjacent thereto before and after the translation candidate wordare sequentially listed to constitute one sentence.

The processor 1300 may also generate the output text by selecting onetranslation candidate word having the highest third weight out of theplurality of translation candidate words.

Also, if the received input text is a speech signal, the processor 1300may convert the speech signal into text.

Also, if the input text includes a predetermined keyword, the processor1300 may determine one portion of the input text before the keyword asthe main segment and another portion after the keyword as thesub-segment.

The processor 1300 may also determine a portion of the input text inputsimultaneously with a predetermined user input or a portion input afterthe user input as the sub-segment.

The processor 1300 may also convert the output text generated as textinto audio signals.

The sensing unit 1400 may include various sensors that sense the stateof the electronic device 1000 or the state around the electronic device1000 and transmit the sensed information to the processor 1300.

The sensing unit 1400 may include various sensors, such as, for example,and without limitation, at least one of a magnetic sensor 1410, anacceleration sensor 1420, a temperature/humidity sensor 1430, aninfrared sensor 1440, a gyroscope sensor 1450, a position sensor (e.g.,GPS) 1460, an air pressure sensor 1470, a proximity sensor 1480, and anRGB sensor (color or illuminance sensor) 1490, without being limitedthereto. Since functions of these sensors may be deduced from the namesthereof by a person skilled in the art, detailed descriptions thereofwill be omitted.

The communication unit 1500 may include one or more elements comprisingcommunication circuitry that allow communications between the electronicdevice 1000 and another device (not shown) or between the electronicdevice 1000 and a server (not shown). For example, the communicationunit 1500 may include a short-range wireless communication unit 1510, amobile communication unit 1520, and a broadcast receiving unit 1530.

The short-range wireless communication unit 1510 may include variousshort-range wireless communication circuitry, such as, for example, andwithout limitation, a Bluetooth communication unit, a Bluetooth LowEnergy (BLE) communication unit, a Near Field Communication unit, a WLAN(Wi-Fi) communication unit, a Zigbee communication unit, an infraredData Association (IrDA) communication unit, a Wi-Fi Direct (WFD)communication unit, an ultra wideband (UWB) communication unit, and anAnt+ communication unit, without being limited thereto.

The mobile communication unit 1520 may include various communicationcircuitry that transmits and receives radio signals to and from at leastone of a base station, an external terminal, and a server on a mobilecommunication network. In this regard, the radio signals may includevarious types of data depending on a voice call signal, a video callsignal, or a text/multimedia message transmission/reception.

The broadcast receiving unit 1530 may include various communicationcircuitry that receives broadcast signals and/or broadcast-relatedinformation from the outside through a broadcast channel. The broadcastchannel may include satellite channels and terrestrial channels.According to an embodiment, the electronic device 1000 may not includethe broadcast receiving unit 1530.

The A/V input unit 1600 may include various A/V input circuitry and isused to input an audio signal or a video signal and may include thecamera 1610 and the microphone 1620. The camera 1610 may acquire animage frame such as a still image or a moving image through an imagesensor in a video communication mode or a photographing mode. An imagecaptured by the image sensor may be processed by the processor 1300 or aseparate image processor (not shown).

The image frame processed by the camera 1610 may be stored in the memory1700 or transmitted to an external device via the communication unit1500. Two or more cameras 1610 may be used according to theconfiguration of a terminal.

The microphone 1620 receives a sound signal from the outside andprocesses the received signal into electrical voice data. For example,the microphone 1620 may receive a sound signal from an external deviceor a speaker. The microphone 1620 may use various noise reductionalgorithms for eliminating noise generated while receiving externalsound signals.

According to an embodiment, the microphone 1620 may receive a speechsignal corresponding to the input text of the first language to betranslated from the speaker.

The memory 1700 may store a program used for processing and controloperation of the processor 1300 and data input to or output from theelectronic device 1000.

The memory 1700 may include at least one storage medium such as a flashmemory type memory, a hard disk type memory, a multimedia card microtype memory, a card type memory (e.g., SD or XD memory), Random AccessMemory (RAM), Static Random Access Memory (SRAM), Read-Only Memory(ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM),(Programmable Read-Only Memory (PROM), a magnetic memory, magnetic disc,and an optical disc.

The programs stored in the memory 1700 may be classified into aplurality of modules according to functions thereof. For example, theprograms may be classified into a UI module 1710, a touch screen module1720, a notification module 1730, and the like.

The UI module 1710 may provide a specified user interface (UI), graphicuser interface (GUI), or the like interworking with the electronicdevice 1000 for each application. The touch screen module 1720 may sensea touch gesture of the user applied to the touch screen and transmitinformation about the touch gesture to the processor 1300. The touchscreen module 1720 according to an embodiment may recognize and analyzea touch code. The touch screen module 1720 may be implemented using aseparate hardware component including a processor.

Various sensors may be provided in or near the touch screen to detect atouch or a near touch on the touch screen. A tactile sensor is anexample of the sensor to detect a touch on the touch screen. The tactilesensor refers to a sensor that detects a contact of a given object tothe degree or more of a person feels. The tactile sensor may obtainvarious information such as roughness of a contact surface, rigidity ofa contact object, and temperature of a contact point.

Another example of the sensor to detect a touch on the touch screen is aproximity sensor.

The proximity sensor refers to a sensor that detects the presence of anobject approaching a predetermined detection surface or an object aroundthe detection surface by using electromagnetic force or infrared rayswithout using mechanical contact. Examples of the proximity sensorinclude a transmissive type photoelectric sensor, a direct reflectivetype photoelectric sensor, a mirror reflective type photoelectricsensor, a high-frequency oscillation proximity sensor, a capacitancetype proximity sensor, a magnetic type proximity sensor, an infrared rayproximity sensor, and the like. The touch gesture of the user mayinclude tab, touch and hold, double tab, drag, panning, flick, drag anddrop, swipe, and the like.

The notification module 1730 may generate a signal to notify occurrenceof an event of the electronic device 1000. Examples of the eventoccurring in the electronic device 1000 may include call signalreception, message reception, key signal input, schedule notification,and the like. The notification module 1730 may output a notificationsignal in the form of a video signal through the display unit 1210, anotification signal in the form of an audio signal through the soundoutput unit 1220, or a notification signal in the form of a vibrationsignal through the vibration motor 1230.

Meanwhile, the embodiments described above may be written as computerprograms and may be implemented in general-use computers that executethe programs using a computer readable medium. In addition, a datastructure used in the embodiments may be recorded on the computerreadable medium via various devices. Also, the aforementionedembodiments may be embodied in the form of a non-transitory recordingmedium including instructions executable by a computer, such as aprogram module, executed by a computer. For example, methods implementedby software modules or algorithms may be stored in computer readablerecording media as codes or program instructions that may be read andexecuted by the computer.

The non-transitory computer readable medium may be any recording mediumthat may be accessed by a computer and may include volatile andnon-volatile media and removable and non-removable media. The computerreadable medium may include magnetic storage media, such as ROM, floppydisks, and hard disks, optical storage media, such as CO ROMs and DVDs,without being limited thereto. The computer readable medium may alsoinclude computer storage media and communication media.

In addition, a plurality of computer readable recording media may bedistributed over computer systems connected via a network, and data,such as program instructions and codes, stored in the distributedrecording media may be executed by at least one computer.

The descriptions given above are to merely provide illustrations ofvarious example embodiments and should not be construed as limiting thescope of the present disclosure. For the conciseness of the disclosure,conventional electronic components, control systems, software, and otherfunctional aspects of the systems may be omitted.

The above description of the present disclosure is provided for thepurpose of illustration, and it would be understood by those skilled inthe art that various changes and modifications may be made withoutchanging technical conception and essential features of the presentdisclosure. Thus, it is clear that the above-described illustrativeembodiments are illustrative in all aspects and do not limit the presentdisclosure. For example, each component described to be of a single typemay be implemented in a distributed manner. Likewise, componentsdescribed to be distributed may be implemented in a combined manner.

Throughout the disclosure, the use of examples and exemplary terms, suchas “and the like” is only illustrative and the scope of the presentdisclosure is not limited by these examples or exemplary terms unlesslimited by the following claims.

Also, the elements described in the present disclosure may not beessential elements unless the elements are clearly described with theterms “essential”, “important”, and the like.

It will be understood by those skilled in the art that various changesin form and details may be made therein without departing from thespirit and scope of the present disclosure.

The embodiments described in the disclosure and illustrated in thedrawings are only illustrative and are not intended to represent allaspects of the disclosure, such that various equivalents andmodifications may be made without departing from the spirit of thedisclosure. Thus, the various example embodiments should be consideredin descriptive sense only and not for purposes of limitation.

The scope of the present disclosure is defined by the following claimsand their equivalents rather than by the detailed description of theillustrative embodiments. It shall be understood that all modificationsand embodiments conceived from the meaning and scope of the claims andtheir equivalents are included in the scope of the present disclosure.

The terms “unit”, “module”, and the like used herein refer to a unitused to process at least one function or operation and may beimplemented by a software component, a hardware component, or anycombination thereof.

The “unit” and “module” may be configured to reside on the addressablestorage medium and configured to execute on one or more processors.

The “unit” and “module” may include, by way of example, components, suchas software components, object-oriented software components, classcomponents and task components, processes, functions, attributes,procedures, subroutines, segments of program code, drivers, firmware,microcode, circuitry, data, databases, data structures, tables, arrays,and variables.

Throughout the disclosure, a phrase “A may include one of a1, a2 and a3”indicates that exemplary elements that may be included in the componentA are a1, a2 or a3 in a broad sense.

Here, the elements that may comprise the component A is not necessarilylimited to a1, a2, or a3. It should be noted, therefore, that theelements that may constitute the component A are not intended topreclude another element not illustrated in addition to a1, a2, and a3.

In addition, the phrase means A may include a1, a2, or a3. The abovephrase does not indicate that the elements constituting the component Aare necessarily selected from a predetermined group. For example, itshould be limitedly interpreted as “a1, a2 and a3 selected from a groupnecessarily including a1, a2 and a3 constitute the component A”.

Throughout the disclosure, the phrase “at least one of a1, a2, and a3”means “a1”, “a2”, “a3”, “a1 and a2”, “a1 and a3”, “a2 and a3”, or “a1,a2 and a3”.

Thus, unless “at least one of a1”, “at least one of a2”, and “at leastone of a3” is clearly stated in the disclosure, the phrase “at least oneof a1, a2 and a3” is not interpreted as “at least one of a1”, “at leastone of a2”, and “at least one of a3”.

However, the embodiments should be considered in descriptive sense onlyand not for the purpose of limitation. Also, it will be understood thatthe disclosure is not limited by the order of operations illustrated inthe flowcharts of FIGS. 2, 3, 5, 9, and 11, and some of the operationsmay be omitted or added and the order of operations may be modified inaccordance with various embodiments.

It should be understood that embodiments described herein should beconsidered in a descriptive sense only and not for purposes oflimitation. Descriptions of features or aspects within each embodimentshould typically be considered as available for other similar featuresor aspects in other embodiments.

While one or more example embodiments have been described with referenceto the figures, it will be understood by those of ordinary skill in theart that various changes in form and details may be made therein withoutdeparting from the spirit and scope as defined by the following claims.

What is claimed is:
 1. An electronic device configured to provide atranslation service comprising: a display; and a processor configuredto: receive an input text of a first language via a user input on thedisplay, the input text comprising a first input text and a second inputtext; detect the first input text and the second input text from amongthe input text based on a predetermined criteria, the first input textcomprising text which is a target to be translated to a second language,and the second input text comprising text explaining meaning of thefirst input text; determine one translation candidate text from aplurality of translation candidate texts corresponding to the detectedfirst input text of the second language, based on a meaning of thedetected second input text; generate output text comprising thedetermined translation candidate text corresponding to the detectedfirst input text; and output the generated output text via the display,wherein the processor is configured to set a first text segment receivedbefore a keyword as the first input text, and a second text segmentreceived after the keyword as the second input text.
 2. The electronicdevice of claim 1, wherein the processor is configured to: extracttranslation candidate words of the second language for words included inthe first input text, and determine first weights for the translationcandidate words of the second language, the first weights indicating adegree of similarity between the translation candidate words of thesecond language for words included in the first input text and themeaning of the text included in the second input text.
 3. The electronicdevice of claim 2, wherein the processor is configured to set a wordincluded in the first input text and corresponding to a translationcandidate word having a highest first weight as a target word whichrequires further defining based on the second input text.
 4. Theelectronic device of claim 1, wherein the processor is configured toextract translation candidate words of the second language for wordsincluded in the first input text, and to determine, second weights forthe translation candidate words of the second language, the secondweights indicating a degree of irrelevancy between the translationcandidate words of the second language for words included in the firstinput text, when a plurality of translation candidate words of thesecond language is searched for among the words included in the firstinput text.
 5. The electronic device of claim 4, wherein the processoris configured to set one of the words included in the first input textand having a highest second weight as a target word second input textwhich requires further defining based on the second input text.
 6. Theelectronic device of claim 1, wherein the processor is configured toextract translation candidate words of the second language for wordsincluded in the first input text, and to determine third weights for thetranslation candidate words of the second language, the third weightsindicating probabilities of a sequential order between adjacenttranslation candidate words included among the translation candidatewords, when a plurality of translation candidate words of the secondlanguage is searched for among the words included the first input text.7. The electronic device of claim 6, wherein the processor is configuredto select a translation candidate word having a highest third weightfrom the plurality of translation candidate words of the second languageand to generate the output text using the selected translation candidateword.
 8. The electronic device of claim 1, wherein the processor isfurther configured to receive the first input text via at least one ofspeech signals and characters input via a keyboard, and the processor isconfigured to convert the input speech signals into the characters whenthe speech signals are received.
 9. The electronic device of claim 1,wherein the processor is configured to set, as the second input text, aportion of text which is input simultaneously with an user input or aportion of text which is input after the user input.
 10. The electronicdevice of claim 1, wherein the processor is configured to convert theoutput text to an audio signal, and the output unit is configured tooutput at least one of the output text and the audio signal.
 11. Amethod of providing a translation service by an electronic device, themethod comprising: receiving an input text of a first language via auser input on a display, the input text comprising a first input textand a second input text; detecting the first input text and the secondinput text from among the input text based on a predetermined criteria,the first input text comprising text which is a target to be translatedto a second language, and the second input text comprising textexplaining meaning of the first input text; determining one translationcandidate text from a plurality of translation candidate textscorresponding to the detected first input text of the second language,based on a meaning of the detected second input text; generating outputtext comprising the determined translation candidate text correspondingto the detected first input text; and outputting the generated outputtext via the display, setting a text segment received before apredetermined keyword as the first input text and a text segmentreceived after the predetermined keyword as the second input text. 12.The method of claim 11, wherein the selecting one translation candidatetext comprises: extracting translation candidate words of the secondlanguage for words included in the first input text; determining firstweights for the translation candidate words of the second language, thefirst weights indicating a degree of similarity between the translationcandidate words of the second language for words included in the firstinput text and the meaning of the text included in the second inputtext; and setting a word included in the first input text andcorresponding to a translation candidate word having a highest firstweight as a target word which requires further defining based on thesecond input text.
 13. The method of claim 11, wherein the selecting onetranslation candidate text comprises: extracting translation candidatewords of the second language for words included in the first input text;determining, second weights for the translation candidate words of thesecond language, the second weights indicating a degree of irrelevancybetween the translation candidate words of the second language for wordsincluded in the first input text, when a plurality of translationcandidate words of the second language is searched for among the wordsincluded in the first input text; and setting one of the words includedin the first input text and having a highest second weight as a targetword which requires further defining based on the second input text. 14.The method of claim 11, wherein the selecting one translation candidatetext comprises: extracting translation candidate words of the secondlanguage for words included in the first input text; determining thirdweights for the translation candidate words of the second language, thethird weights indicating probabilities of a sequential order betweenadjacent translation candidate words included among the translationcandidate words when a plurality of translation candidate words of thesecond language is searched for among the words included the first inputtext; and selecting a translation candidate word having a highest thirdweight from the plurality of translation candidate words of the secondlanguage and generating the output text using the selected translationcandidate word.
 15. The method of claim 11, further comprising setting,as the second input text, a portion of text which is inputsimultaneously with an user input or a portion of text which is inputafter the input.
 16. A non-transitory computer readable recording mediumcomprising a program, which when executed by a computer, performs themethod of claim 11.